package com.tjbank.cssys.mybatis;

import com.tjbank.cssys.mybatis.entity.IamUser;
import com.tjbank.cssys.mybatis.entity.IamUserKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamUserSqlBuilder;
import java.util.List;
import java.util.Map;

/**
 * IamUserDao
 * 乐观锁模式
 * 
 * @author PG(Auto Generator)
 * @version V2.0
 */
public interface IamUserDao {

    /**
     * 根据SqlBuilder查询列表，返回值包含大字段栏位
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamUser> selectListBySqlBuilderWithBLOBs(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamUser> selectListBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询单个对象，返回值包含大字段栏位
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public IamUser selectBySqlBuilderWithBLOBs(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询单个对象，返回值不包含大字段栏位
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public IamUser selectBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据主键查询单个对象
     * 
     * @param iamUserKey
     * @return
     * @throws Exception
     */
    public IamUser selectByPrimaryKey(IamUserKey iamUserKey) throws RuntimeException;

    /**
     * 根据SqlBuilder统计记录条数
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public long countBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 单条插入新增记录
     * 
     * @param iamUser
     * @return
     * @throws Exception
     */
    public int insert(IamUser iamUser) throws RuntimeException;

    /**
     * 批量插入新增记录
     * 
     * @param listIamUsers
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamUser> listIamUsers) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamUser
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilder(IamUser iamUser, IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值不会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamUser
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilderSelective(IamUser iamUser, IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamUser
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamUser iamUser) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamUser
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamUser iamUser) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     * 
     * @param iamUserKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamUserKey iamUserKey) throws RuntimeException;


    public Map<String,String> getUserCode(Map<String,String> map);
}